服务器_Linux系统服务器站点流量限制的方案,#! /bin/sh # Simple bandwidth lim
# We're talking about megabits, not megabytes, so 80Kbit is
iptables -t mangle -A OUTPUT -p tcp ——sport 80 -j MARK ——set-mark 1
tc filter add dev "$NIC" parent 1: protocol ip handle 1 fw classid 1:10
本文作者:tc qdisc add dev "$NIC" root handle 1: cbq \
REAL_BW='10Mbit'
tc qdisc del dev "$NIC" root 2> /dev/null
# 10 Kilobytes/s
# get, not the speed of a local Ethernet link)
# Change this to the bandwidth you want to allocate to WEB.
tc class add dev "$NIC" parent 1: classid 1:1 cbq bandwidth "$REAL_BW" \
rate "$REAL_BW" maxburst 1 avpkt 1000
# Change this to your link bandwidth
WEB_BW='1000Kbit'
# Simple bandwidth limiter - <[email][email protected][/email]>
bandwidth "$REAL_BW" avpkt 1000
tc qdisc add dev "$NIC" parent 1:10 sfq perturb 10
# (for cable modem, DSL links, etc. put the maximal bandwidth you can
bandwidth "$REAL_BW" rate "$WEB_BW" maxburst 1 avpkt 1000 bounded
# Change this to your physical network device (or 'ppp0')
tc class add dev "$NIC" parent 1:1 classid 1:10 cbq \
NIC='eth0'
本站内容来源于网络,如有侵权请与我们联系,我们会及时删除,我们深感抱歉!
注:本站所有信息仅供用于网络技术学习参考,学习中请遵循相关法律法规!
本文地址: https://v30.fanwenzhu.com/server/yun/5898.shtml
相关文章
热门TAG
win10 ecshop 主机 阿里云 解决 配置 C# C++ 解析 SQL语句 命令 Go语言 方法 CSS3 HTML5 CSS win7 MSSQL 服务器配置 IIS7.5 IIS7 IIS6 IIS CentOS 7 Linux oracle数据库 oracle phpcms discuz discuz教程最新文章
-
租用云服务器后的备案问
时间:2021-01-05
-
百度云服务器bcc有什么优
时间:2021-01-05
-
什么是云服务器cvm?怎么
时间:2021-01-05
-
云服务器怎么保证信息安
时间:2021-01-05
-
云服务器怎么预防被攻击
时间:2021-01-05
-
阿里云ECS实例设置用户r
时间:2020-12-29
-
阿里云ECS服务器入门使用
时间:2020-12-29
-
怎么配置云服务器
时间:2020-12-28
热门文章
-
租用云服务器后的备案问题你真的了解吗
时间:2021-01-05
-
选择美国云服务器需要关注什么?
时间:2020-12-27
-
阿里云服务器怎么买?阿里云服务器购买
时间:2020-12-25
-
运维必须知道的关于云服务器的十个问题
时间:2020-12-24
-
如何快速搭建一个阿里云服务器
时间:2020-12-24
-
什么是云?什么是云服务?什么是云主机
时间:2020-12-25
-
云服务器网站承载量一般有多大?一个云
时间:2020-12-28
-
浅谈云服务器和独立服务器的八大差异
时间:2020-12-24
-
SugarHosts云服务器如何开启访问端口和使用
时间:2020-12-24
-
云服务器是什么,云主机干什么用的?
时间:2020-12-28
